import java.util.Scanner;

public class Demo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个数字");
        int number = sc.nextInt();
        int[] feibo = new int[number];
//        feibo[0] = 1;
//        feibo[1] = 1;
//        for (int i = 1; i <= number - 2; i ++) {
//            feibo[i + 1] = feibo[i] + feibo[i - 1];
//        }
//
//        for (int i = 0; i < feibo.length; i++) {
//            System.out.println(feibo[i]);
//        }
//        int prev = 1; // 第一个值
//        int next = 1; // 第二个值
        if (number == 1) {
            feibo[0] = 1;
        } else if (number == 2) {
            feibo[0] = 1;
            feibo[1] = 1;
        } else {
            // feibo : 1 1 2 3
            feibo[0] = 1;
            feibo[1] = 1;    // 1 1 x
            for (int i = 3; i <= number; i++) { // i = 3 i = 4
                feibo[i - 1] = feibo[i - 3] + feibo[i - 2];
//             = curr;
//            prev = next;
//            next = curr;
            }
        }
        for (int i = 0; i < feibo.length; i++) {
            System.out.println(feibo[i]);
        }
    }
}
